﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using BCCommon.TMS.Order;
using BCCommon.Extensions;
using BCCommon.TMS.Transport;
using BCDto.TMS.Order.OrderExtention;

namespace BCDto.TMS.Order
{
	/// <summary>
	/// 订单
	/// </summary>
	public class OrderDto
	{
		/// <summary>
		/// 订单Id
		/// </summary>		
		public long OrderId { get; set; }
		/// <summary>
		/// 订单编号
		/// </summary>		
		public string OrderNo { get; set; }
		/// <summary>
		/// 运输订单Id
		/// </summary>		
		public long TransportOrderId { get; set; }
		/// <summary>
		/// 运输订单编号
		/// </summary>		
		public string TransportOrderNo { get; set; }
		/// <summary>
		/// 来源类型
		/// </summary>		
		public string SourceType { get; set; }
		/// <summary>
		/// 大客户订单
		/// </summary>		
		public bool IsVip { get; set; }
		/// <summary>
		/// 发货人Id(仓储及电商来源，此Id为对应系统用户id)
		/// </summary>		
		public long UserId { get; set; }
		/// <summary>
		/// 发货人姓名
		/// </summary>		
		public string Shipping { get; set; }
		/// <summary>
		/// 发货人性别
		/// </summary>
		public ContacterGenderType ShippingGender { get; set; }
		/// <summary>
		/// 发货人电话
		/// </summary>		
		public string ShippingPhone { get; set; }
		/// <summary>
		/// 发货人地址（货物地址）
		/// </summary>		
		public string ShippingAddress { get; set; }
		/// <summary>
		/// 收货人姓名（多卸地保存最后一个）
		/// </summary>		
		public string Consignee { get; set; }
		/// <summary>
		/// 收货人性别
		/// </summary>
		public ContacterGenderType ConsigneeGender { get; set; }
		/// <summary>
		/// 收货人电话
		/// </summary>		
		public string ConsigneePhone { get; set; }
		/// <summary>
		/// 收货人地址（最终目的地）
		/// </summary>		
		public string ConsigneeAddress { get; set; }
		/// <summary>
		/// 取件码
		/// </summary>
		public string TakeGoodsCode { get; set; }
		/// <summary>
		/// 货物照片
		/// </summary>		
		public string GoodsPhoto { get; set; }
		/// <summary>
		/// 货物名称
		/// </summary>		
		public string GoodsName { get; set; }
		/// <summary>
		/// 货物重量
		/// </summary>		
		public decimal? GoodsWeight { get; set; }
		/// <summary>
		/// 货物体积
		/// </summary>		
		public decimal? GoodsVolume { get; set; }
		/// <summary>
		/// 货物长度
		/// </summary>		
		public decimal? GoodsLength { get; set; }
		/// <summary>
		/// 货物宽度
		/// </summary>		
		public decimal? GoodsWidth { get; set; }
		/// <summary>
		/// 货物高度
		/// </summary>		
		public decimal? GoodsHeight { get; set; }
		/// <summary>
		/// 付费方式
		/// </summary>		
		public PayMode PayMode { get; set; }
		/// <summary>
		/// 付费方式
		/// </summary>
		public string PayModeStr { get { return this.PayMode.GetDescriptionString(); } }
		/// <summary>
		/// 预约订单
		/// </summary>		
		public bool IsBook { get; set; }
		/// <summary>
		/// 运输业务Id
		/// </summary>		
		public int VehicleTransportBusinessConfigId { get; set; }
		/// <summary>
		/// 运输业务
		/// </summary>		
		public string TransportBusiness { get; set; }
		/// <summary>
		/// 运输业务
		/// </summary>		
		public string TransportBusinessStr { get; set; }
		/// <summary>
		/// 套餐业务类型
		/// </summary>		
		public string SuiteBusinessType { get; set; }
		/// <summary>
		/// 套餐业务名称
		/// </summary>		
		public string SuiteBusinessName { get; set; }
		/// <summary>
		/// 车辆套餐业务配置Id
		/// </summary>		
		public int? VehicleSuiteBusinessConfigId { get; set; }
		/// <summary>
		/// 套餐名称
		/// </summary>		
		public string SuiteName { get; set; }
		/// <summary>
		/// 车辆业务映射Id
		/// </summary>		
		public int? VehicleBusinessMappingId { get; set; }
		/// <summary>
		/// 车辆类型Id
		/// </summary>		
		public int? VehicleTypeId { get; set; }
		/// <summary>
		/// 车型名称
		/// </summary>		
		public string VehicleTypeName { get; set; }
		/// <summary>
		/// 车型分类（对应字典引用检索键）
		/// </summary>		
		public string VehicleCategory { get; set; }
		/// <summary>
		/// 车型分类名称
		/// </summary>		
		public string VehicleCategoryName { get; set; }
		/// <summary>
		/// 跟车人数
		/// </summary>
		public int? WithCarPeopleNumber { get; set; }
		/// <summary>
		/// 跟车人电话
		/// </summary>
		public string WithCarPeoplePhone { get; set; }
		/// <summary>
		/// 物流类型（一般、快速、急速）
		/// </summary>		
		public string FreightType { get; set; }
		/// <summary>
		/// 运费Id
		/// </summary>		
		public int? FreightConfigurationId { get; set; }
		/// <summary>
		/// 运费扩展Id
		/// </summary>		
		public int? FreightConfigurationExtentionId { get; set; }
		/// <summary>
		/// 骑手运费配置Id
		/// </summary>		
		public long? HorsemanFreightConfigurationId { get; set; }
		/// <summary>
		/// 骑手运费扩展Id
		/// </summary>		
		public long? HorsemanFreightExtentionId { get; set; }
		/// <summary>
		/// 跑腿业务类型
		/// </summary>
		public OrderRunErrandsType RunErrandsBusinessType { get; set; }
		/// <summary>
		/// 跑腿业务类型
		/// </summary>
		public string RunErrandsBusinessTypeStr { get { return this.RunErrandsBusinessType.GetDescriptionString(); } }
		/// <summary>
		/// 货物价值
		/// </summary>
		public decimal? GoodsWorth { get; set; }
		/// <summary>
		/// 起步价
		/// </summary>		
		public decimal? StartPrice { get; set; }
		/// <summary>
		/// 起步重量
		/// </summary>		
		public int? StartWeight { get; set; }
		/// <summary>
		/// 起步里程
		/// </summary>		
		public int? StartMileage { get; set; }
		/// <summary>
		/// 续程数量
		/// </summary>		
		public int? ContinueMileage { get; set; }
		/// <summary>
		/// 续重数量
		/// </summary>		
		public int? ContinueWeight { get; set; }
		/// <summary>
		/// 续程价格
		/// </summary>		
		public decimal? ContinueMileagePrice { get; set; }
		/// <summary>
		/// 续重价格
		/// </summary>		
		public decimal? ContinueWeightPrice { get; set; }
		/// <summary>
		/// 续程金额
		/// </summary>		
		public decimal? ContinueMileageAmount { get; set; }
		/// <summary>
		/// 续重金额
		/// </summary>		
		public decimal? ContinueWeightAmount { get; set; }
		/// <summary>
		/// 特殊服务标题
		/// </summary>		
		public string SpecificServiceTitleStr { get; set; }
		/// <summary>
		/// 特殊服务费金额
		/// </summary>		
		public decimal? SpecificServiceAmount { get; set; }
		/// <summary>
		/// 搬家规格服务（逗号分隔规格与服务）
		/// </summary>		
		public string MoveHouseSpecificationService { get; set; }
		/// <summary>
		/// 搬家服务金额
		/// </summary>		
		public decimal? MoveHouseServiceAmount { get; set; }
		/// <summary>
		/// 适合人群标题
		/// </summary>		
		public string SuiteForCrowdTitle { get; set; }
		/// <summary>
		/// 适合人群备注
		/// </summary>		
		public string SuiteForCrowdRemark { get; set; }
		/// <summary>
		/// 套餐服务标题
		/// </summary>		
		public string SuiteServiceTitle { get; set; }
		/// <summary>
		/// 套餐服务备注
		/// </summary>		
		public string SuiteServiceRemark { get; set; }
		/// <summary>
		/// 搬运服务费金额
		/// </summary>		
		public decimal? CarryServiceAmount { get; set; }
		/// <summary>
		/// 套餐优惠卷金额
		/// </summary>		
		public decimal? SuiteCouponAmount { get; set; }
		/// <summary>
		/// 大件商品数量
		/// </summary>
		public int? BigGoodsNumber { get; set; }
		/// <summary>
		/// 营销优惠券Id
		/// </summary>		
		public long? MarketingCouponId { get; set; }
		/// <summary>
		/// 优惠金额
		/// </summary>		
		public decimal? CouponAmount { get; set; }
		/// <summary>
		/// 包装材料标题
		/// </summary>		
		public string PackingTitleStr { get; set; }
		/// <summary>
		/// 包装材料金额
		/// </summary>		
		public decimal? PackingAmount { get; set; }
		/// <summary>
		/// 夜间运费订单抽取比例
		/// </summary>		
		public decimal? NightFreightOrderExtractProportion { get; set; }
		/// <summary>
		/// 夜间运费加收金额
		/// </summary>		
		public decimal? NightFreightAdditionalAmount { get; set; }
		/// <summary>
		/// 保价配置Id
		/// </summary>		
		public int? InsuredConfigId { get; set; }
		/// <summary>
		/// 保价货物价值凭证
		/// </summary>		
		public string InsuredPriceCertificates { get; set; }
		/// <summary>
		/// 保价金额(货物保价金额)
		/// </summary>		
		public decimal? InsuredPrice { get; set; }
		/// <summary>
		/// 保价金额的千分之10，最低10元
		/// </summary>		
		public decimal? InsuredPriceCharge { get; set; }
		/// <summary>
		/// 保价金额超过上限
		/// </summary>		
		public bool? IsInsuredPriceHigh { get; set; }
		/// <summary>
		/// 保价索赔重量
		/// </summary>		
		public int? InsuredClaimWeight { get; set; }
		/// <summary>
		/// 保价索赔件数
		/// </summary>		
		public int? InsuredClaimCount { get; set; }
		/// <summary>
		/// 保价索赔金额
		/// </summary>		
		public decimal? InsuredClaimPay { get; set; }
		/// <summary>
		/// 保价金额总额(货物保价金额)
		/// </summary>		
		public decimal? InsuredPriceAmount { get; set; }
		/// <summary>
		/// 保价金额总额的千分之10，最低10元
		/// </summary>		
		public decimal? InsuredPriceChargeAmount { get; set; }
		/// <summary>
		/// 代收货款金额
		/// </summary>		
		public decimal? CodCost { get; set; }
		/// <summary>
		/// 代收货款费用
		/// </summary>		
		public decimal? CodCharge { get; set; }
		/// <summary>
		/// 代收货款商品价值凭证
		/// </summary>		
		public string CodGoodsValueCertificates { get; set; }
		/// <summary>
		/// 超时索赔金额总额
		/// </summary>		
		public decimal? TimeoutClaimPayAmount { get; set; }
		/// <summary>
		/// 保价索赔金额总额
		/// </summary>		
		public decimal? InsuredClaimPayAmount { get; set; }
		/// <summary>
		/// 代收货款金额总额
		/// </summary>		
		public decimal? CodCostAmount { get; set; }
		/// <summary>
		/// 代收货款费用总额
		/// </summary>		
		public decimal? CodChargeAmount { get; set; }
		/// <summary>
		/// 打赏金额（此金额不参与订单总价）
		/// </summary>		
		public decimal? MusangAmount { get; set; }
		/// <summary>
		/// 发货地省份Code
		/// </summary>		
		public string ProvinceCode { get; set; }
		/// <summary>
		/// 发货地省
		/// </summary>		
		public string ProvinceName { get; set; }
		/// <summary>
		/// 发货地市Code
		/// </summary>		
		public string CityCode { get; set; }
		/// <summary>
		/// 发货地市
		/// </summary>		
		public string CityName { get; set; }
		/// <summary>
		/// 发货地区县Code
		/// </summary>		
		public string CountyCode { get; set; }
		/// <summary>
		/// 发货地区县
		/// </summary>		
		public string CountyName { get; set; }
		/// <summary>
		/// 发货地经度
		/// </summary>		
		public double Longitude { get; set; }
		/// <summary>
		/// 发货地纬度
		/// </summary>		
		public double Latitude { get; set; }
		/// <summary>
		/// 最终目的地省份Code
		/// </summary>		
		public string EndProvinceCode { get; set; }
		/// <summary>
		/// 最终目的地省
		/// </summary>		
		public string EndProvinceName { get; set; }
		/// <summary>
		/// 最终目的地市Code
		/// </summary>		
		public string EndCityCode { get; set; }
		/// <summary>
		/// 最终目的地市
		/// </summary>		
		public string EndCityName { get; set; }
		/// <summary>
		/// 最终目的地区县Code
		/// </summary>		
		public string EndCountyCode { get; set; }
		/// <summary>
		/// 最终目的地区县
		/// </summary>		
		public string EndCountyName { get; set; }
		/// <summary>
		/// 最终目的地经度
		/// </summary>		
		public double EndLongitude { get; set; }
		/// <summary>
		/// 最终目的地纬度
		/// </summary>		
		public double EndLatitude { get; set; }
		/// <summary>
		/// 创建时间
		/// </summary>		
		public DateTime CreateTime { get; set; }
		/// <summary>
		/// 预约时间
		/// </summary>		
		public DateTime? BookTime { get; set; }
		/// <summary>
		/// 完成时间
		/// </summary>		
		public DateTime? CompleteTime { get; set; }
		/// <summary>
		/// 给司机捎句话
		/// </summary>		
		public string DriverRemark { get; set; }
		/// <summary>
		/// 高德配置模式
		/// </summary>		
		public int MapTruckModeId { get; set; }
		/// <summary>
		/// 高德配置卡车类型
		/// </summary>		
		public int MapTruckTypeId { get; set; }
		/// <summary>
		/// 司机Id
		/// </summary>		
		public long? DriverId { get; set; }
		/// <summary>
		/// 司机姓名
		/// </summary>
		public string DriverName { get; set; }
		/// <summary>
		/// 司机电话
		/// </summary>
		public string DriverPhone { get; set; }
		/// <summary>
		/// 车牌号
		/// </summary>		
		public string VehicleNo { get; set; }
		/// <summary>
		/// 订单状态
		/// </summary>		
		public OrderStatus OrderStatus { get; set; }
		/// <summary>
		/// 订单状态
		/// </summary>
		public string OrderStatusStr { get { return this.OrderStatus.GetDescriptionString(); } }
		/// <summary>
		/// 保价服务
		/// </summary>		
		public bool IsInsuredPrice { get; set; }
		/// <summary>
		/// 代收货款服务
		/// </summary>		
		public bool IsCod { get; set; }
		/// <summary>
		/// 回单服务
		/// </summary>		
		public bool IsReceipt { get; set; }
		/// <summary>
		/// 回单照片(原始)
		/// </summary>		
		public string ReceiptPhoto { get; set; }
		/// <summary>
		/// 回单签收照片
		/// </summary>		
		public string ReceiptAcceptancePhoto { get; set; }
		/// <summary>
		/// 开发票
		/// </summary>		
		public bool IsInvoice { get; set; }
		/// <summary>
		/// 发票已开
		/// </summary>		
		public bool? IssuanceInvoice { get; set; }
		/// <summary>
		/// 订单总额
		/// </summary>		
		public decimal? OrderAmount { get; set; }
		/// <summary>
		/// 运费金额总额
		/// </summary>		
		public decimal? FreightCostAmount { get; set; }
		/// <summary>
		/// 总距离长度
		/// </summary>		
		public decimal TotalDistanceLength { get; set; }
		/// <summary>
		/// 保价过高需要联系货主
		/// </summary>
		public bool? IsInsuredContact { get; set; }
		/// <summary>
		/// 预约到达时间
		/// </summary>
		public DateTime? BookArrivalTime { get; set; }
		/// <summary>
		/// 通知司机时间
		/// </summary>		
		public DateTime? NotifyDriveTime { get; set; }
		/// <summary>
		/// 司机接单时间
		/// </summary>		
		public DateTime? DriveOrderPromising { get; set; }
		/// <summary>
		/// 车辆出发时间
		/// </summary>		
		public DateTime? VehicleStartOutTime { get; set; }
		/// <summary>
		/// 取消订单时间
		/// </summary>		
		public DateTime? CloseOrderTime { get; set; }
		/// <summary>
		/// 取消订单原因
		/// </summary>		
		public string CloseOrderContent { get; set; }
		/// <summary>
		/// 发票税金
		/// </summary>		
		public decimal? InvoiceAmount { get; set; }
		/// <summary>
		/// 发货人付款时间
		/// </summary>		
		public DateTime? ShippingPayTime { get; set; }
		/// <summary>
		/// 收货人付款时间
		/// </summary>		
		public DateTime? ConsigneePayTime { get; set; }
		/// <summary>
		/// 订单结算结果（完成订单、原路退回）
		/// </summary>
		public OrderAmountSettleResultType OrderAmountSettleResult { get; set; }
		/// <summary>
		/// 已结算
		/// </summary>		
		public bool IsSettlement { get; set; }
		/// <summary>
		/// 关闭操作人
		/// </summary>		
		public long? CloseEditerId { get; set; }
		/// <summary>
		/// 关闭操作人
		/// </summary>		
		public string CloseEditer { get; set; }
		/// <summary>
		/// 备注
		/// </summary>		
		public string Remark { get; set; }
		/// <summary>
		/// 订单签收图片
		/// </summary>		
		public string OrderSignPhoto { get; set; }
		/// <summary>
		/// 订单签收时间
		/// </summary>		
		public DateTime? OrderSignTime { get; set; }
		/// <summary>
		/// 订单签收人
		/// </summary>		
		public string OrderSignPerson { get; set; }
		/// <summary>
		/// 订单签收人手机号
		/// </summary>		
		public string OrderSignPersonPhone { get; set; }

		/// <summary>
		/// 指派人Id
		/// </summary>		
		public long? AssignEditerId { get; set; }
		/// <summary>
		/// 指派人
		/// </summary>		
		public string AssignEditer { get; set; }
		/// <summary>
		/// 公司Id
		/// </summary>		
		public int? CompanyId { get; set; }
		/// <summary>
		/// 公司名称
		/// </summary>		
		public string CompanyName { get; set; }
		/// <summary>
		/// 代理商网点配置Id
		/// </summary>
		public long? AgentBranchesConfigId { get; set; }
		/// <summary>
		/// 代理商Id
		/// </summary>		
		public long AgentRecordId { get; set; }
		/// <summary>
		/// 一级代理商Id
		/// </summary>		
		public long? OneAgentRecordId { get; set; }
		/// <summary>
		/// 二级代理商Id
		/// </summary>		
		public long? TwoAgentRecordId { get; set; }
		/// <summary>
		/// 围栏Id
		/// </summary>		
		public long? FenceId { get; set; }
		/// <summary>
		/// 订单扩展信息
		/// </summary>
		public List<OrderExtentionDto> OrderExtentionInfo { get; set; }

	}
}

